<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='异常信息-编辑',cssPaths='/static/css/services/item/add.css',jsPaths='/static/js/services/roundsdeviant/add.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="">护理管理</a>
                    <a href="/roundsDeviant">异常信息</a>
                    <a><cite>编辑</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content layui-container">
        <form class="layui-form" th:action="@{/roundsDeviant/update}" method="post">
            <input type="hidden" name="id"  th:value="${roundsDdeviant.id}">
            <div class="layui-form-item">
                <label class="layui-form-label must">老人姓名</label>
                <div class="layui-input-inline">
                    <input type="text" name="elderlyName" id="elderlyName" readonly required
                           lay-verify="required" placeholder="请点击选择老人姓名" autocomplete="off" class="layui-input" style="width: 970px;" th:value="${roundsDdeviant.elderlyName}">
                    <input type="hidden" name="elderlyId" id="elderlyId">
                    <input type="hidden" name="elderNo" id="elderNo"  th:value="${roundsDdeviant.elderNo}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">所属楼宇</label>
                <div class="layui-input-block">
                    <select name="buildingId" id="buildingId" lay-filter="buildingId" lay-verify="required">
                        <option value=""></option>
                        <option th:each="b:${buildings}" th:value="${b.id}" th:text="${b.name}" th:selected="${roundsDdeviant.buildingNo eq b.name}" th:id="${b.id}"></option>
                    </select>
                    <input type="hidden" name="buildingNo" id="buildingNo" th:value="${roundsDdeviant.buildingNo}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">所属楼层</label>
                <div class="layui-input-block">
                    <select id="floorNo" name="floor" lay-filter="floorNo" lay-verify="required">
                        <option value=""></option>
                        <option  th:each="b:${roundsDdeviant}" th:value="${b.floor}" th:text="${b.floor}" th:selected="${roundsDdeviant.floor}"></option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">所属房间</label>
                <div class="layui-input-block">
                    <select id="roomId" name="roomCode" lay-verify="required">
                        <option value=""></option>
                        <option th:each="b:${rooms}" th:value="${b.code}" th:text="${b.code}" th:selected="${roundsDdeviant.roomCode eq b.code}"></option>
                    </select>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label must">异常描述</label>
                        <div class="layui-input-block">
                            <textarea name="deviantRemark" maxlength="2500" placeholder="异常描述" class="layui-textarea" th:text="${roundsDdeviant.deviantRemark}" lay-verify="required"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-form-item">
                        <label class="layui-form-label must">处理结果</label>
                        <div class="layui-input-block">
                            <textarea name="deviantResult" maxlength="2500" placeholder="处理结果" class="layui-textarea" th:text="${roundsDdeviant.deviantResult}" lay-verify="required"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                    <a href="/roundsDeviant" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>

    </div>
</div>
</html>